clc;clear
x=[2 4 6 23 7 8 22 44 47 12]';
y=[3 36 97 22 46 11 9 54 32 21]';
z=corr(x,y,'type','Spearman')

A=[1 2 3 4 0 6 7 8 9
    3 5 7 8 9 11 13 15 16
    6 5 4 8 9 12 13 15 17]';
B=corr(A,'type','Spearman')